/**
 * 获取最长不同字符字串
 * @param s [String] 原始字符串
 * @return [String]
 */
export const getMaxLength = (s: string) => {
    if(!s || (s.length < 2)) return s
    let maxStr = ''
    for (let i = 0; i < s.length; i++) {
        let str = s[i]
        for (let j = i + 1; j < s.length; j++) {
            const index = str.indexOf(s[j])
            if(index > -1) {
                i = index + i
                break
            }
            str += s[j]
        }
        maxStr = maxStr.length > str.length ? maxStr : str
    }
    return maxStr
}